package com.yan.qing.bootaspect.controller;

import com.alibaba.fastjson.JSON;
import com.yan.qing.bootaspect.Annotitaion.OperateLogs;
import com.yan.qing.bootaspect.operate.OperateBusinessEnum;
import com.yan.qing.bootaspect.operate.OperateTypeEnum;
import com.yan.qing.bootaspect.operate.OperateUserTypeEnum;
import com.yan.qing.bootaspect.request.TestRequest;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/test")
public class TestController {

    @OperateLogs(operateBusiness = OperateBusinessEnum.TEST, operateType = OperateTypeEnum.EXPORT,
            operateUserType = OperateUserTypeEnum.STAFF, operateTitle = "导出", operateDetail = "${tokenRealName}在${date}导出")
    @PostMapping("/test")
    public String test(@RequestBody TestRequest testRequest){
        return JSON.toJSONString(testRequest);
    }

}
